package com.cytech.cloudclinic.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.cytech.cloudclinic.R;
import com.cytech.cloudclinic.bean.Prescription;

import java.util.List;

public class PrescriptionAdapter extends BaseQuickAdapter<Prescription, BaseViewHolder> {
    public PrescriptionAdapter(List<Prescription> data) {
        super(R.layout.item_case_prescription, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, Prescription prescription) {
        baseViewHolder.setText(R.id.item_prescript_name,prescription.drug_name);
        baseViewHolder.setText(R.id.item_prescript_size,prescription.cont+prescription.cont_unit);
        baseViewHolder.setText(R.id.item_prescript_use,prescription.frequency+"/"+prescription.dosage+prescription.dosage_unit);
        baseViewHolder.setText(R.id.item_prescript_price,prescription.price+"元");
    }
}
